﻿package cgs.server.logging.messages
{
    import cgs.server.logging.*;
    import cgs.server.logging.actions.*;

    public class BufferedMessage extends Message implements IQuestMessage
    {
        private var _actions:Array;
        private var _dqid:String;
        private var _localDQID:int;
        private var _questID:int;

        public function BufferedMessage(param1:GameServerData = null)
        {
            super(param1);
            this._actions = [];
            return;
        }// end function

        public function setDQID(param1:String) : void
        {
            this._dqid = param1;
            return;
        }// end function

        public function get dqid() : String
        {
            return this._dqid;
        }// end function

        public function isDQIDValid() : Boolean
        {
            return this._dqid != null;
        }// end function

        public function setLocalDQID(param1:int) : void
        {
            this._localDQID = param1;
            return;
        }// end function

        public function getLocalDQID() : int
        {
            return this._localDQID;
        }// end function

        public function setQuestID(param1:int) : void
        {
            this._questID = param1;
            return;
        }// end function

        public function getQuestID() : int
        {
            return this._questID;
        }// end function

        public function getActionCount() : int
        {
            return this._actions.length;
        }// end function

        public function addAction(param1:IClientAction) : void
        {
            this._actions.push(param1.actionObject);
            return;
        }// end function

        public function get actions() : Array
        {
            return this._actions;
        }// end function

        override public function injectParams() : void
        {
            super.injectParams();
            injectLevelID(true);
            injectTypeID(true);
            injectSessionID(true);
            addProperty("actions", this._actions);
            addProperty("dqid", this._dqid);
            addProperty("qid", "" + this._questID);
            return;
        }// end function

    }
}
